﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Identify.aspx.cs" Inherits="WebPages.AdminPages.Identify" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.5.1.min.js"></script>
    <script>
        $(document).ready(function () {
            $("table img").bind("click", function () {
                var _this = $(this);
                enlarge(_this);
            });
       
        });
        function enlarge(_this) {
            var src = _this.attr("src");
            $("#bigimg").attr("src", src);
            $("<img/>").attr("src", src).on("load",function () {
                var windowsW = $(window).width();
                var windowsH = $(window).height();
                var realW = this.width;
                var realH = this.height;
                var imgW, imgH;
                var scale = 0.8;
                imgW = realW;
                imgH = realH;
                while (imgW > windowsW * scale || imgH > windowsH * scale) {
                    imgW = imgW * scale;
                    imgH = imgH * scale;
                };
                $("#bigimg").css("width", imgW);
                $("#bigimg").css("height", imgH);
                var w = (windowsW - imgW) / 2;
                var h = (windowsH - imgH) / 2;
                $("#innerdiv").css({
                    "top": h, 
                    "left": w
                });
                $("#outdiv").fadeIn("fast");


            });
            $("#outdiv").on("click",function () {
                $("#outdiv").fadeOut("fast");
            });
            
        }
        
       
    </script>
    <style>
        .img{
            width:150px;
            height:90px;
        }
        #outdiv{
            position:fixed;
            top:0;
            left:0;
            background:rgba(0,0,0,0.7);
            z-index:2;
            width:100%;
            height:100%;
            display:none;
        }
        #innerdiv{
            position:absolute;
        }
    </style>
</head>
    
<body>
    <form id="form1" runat="server">
        <div>
            <p>我是认证管理界面</p>
            <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                <HeaderTemplate>
                    <table border="1">
                       <tr>
                           <th colspan="6">待处理请求</th>
                       </tr>
                        <tr>
                            <th>
                               学号
                            </th>
                            <th>
                                姓名
                            </th>
                             <th>
                                 邮箱地址
                             </th>
                            <th>
                                请求发起时间
                            </th>
                             <th>
                                学生证图片
                            </th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                             <label id="label3" class="showlable" runat="server" text="" ><%#Eval("SID")%></label>
                        </td>
                        <td>
                            <label id="label1" class="showlable" runat="server" text=""> <%#Eval("name")%></label>
                        </td>
                        <td>
                            <label id="label2" class="showlable" runat="server" text=""> <%#Eval("email")%></label>
                        </td>
                         <td>
                            <label id="label4" class="showlable" runat="server" text=""> <%#Eval("regtime")%></label>
                        </td>
                        <td>
                            <img src='<%#Eval("acceptpicture")%>' class="img" />                         
                        </td>
                        <td>
                            <asp:Button ID="Button1" runat="server" Text="接受" CommandName="Accept" CommandArgument='<%#Eval("SID")%>' />
                            <asp:Button ID="Button2" runat="server" Text="拒绝" CommandName="Refuse" CommandArgument='<%#Eval("SID")%>' />
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>
        <div id="outdiv">
            <div id="innerdiv">
                <img  style="border:5px solid #fff;" src="" id="bigimg" />
            </div>

        </div>
    </form>
</body>
</html>
